/*
 * RectangleAttachment.java
 *
 * Created on 19 maart 2008, 9:45
 *
 * @author wijnand.schepens@hogent.be
 */
package model.graphic.objects;

import model.graphic.locations.FlexibleRelativeLocation;
import model.graphic.locations.Location;

public abstract class LeftRectangleHandle extends RectangleAttachment {

    public LeftRectangleHandle() {
    }

    public LeftRectangleHandle(Graphical base, Location location, int minSize, int width, int height) {
        super(base, location, minSize, width, height);
        setLocations(location);
    }

    @Override
    public void adjustLocations(Graphical base, Location location) {
        adjustLocation(base, location);
        setLocation(location);
    }

    @Override
    public void setLocations(Location location) {
        lowerRight = new FlexibleRelativeLocation(location, width, height);
        upperRight = new FlexibleRelativeLocation(location, width, 0);
        lowerLeft = new FlexibleRelativeLocation(location, 0, height);
        setLocation(location);
    }
}